#ifndef SYMBOLICVAR_H
#define SYMBOLICVAR_H
#include <string>
#include "primaryExpression.h"
#include "enums.h"

/*Class: SymbolicVariable
 * A class to represent symbolic variables related with SQL tables definitions
 */
class SymbolicVariable: public PrimaryExpression{

protected:
	/*Variable tableName:
	 * 	The name of the SQL table where the symbolic variable is.
	 */
	std::string tableName;
	/*Variable columnName:
	 * 	 The name of the Column of the SQL table where symbolic variable is.
	 */
	std::string columnName;
	/*Variable rowIndex:
	 * 	The index of the row where the symbolic variable is.
	 */
	int rowIndex;
	/*Variable type:
	 * 	The type of the symbolic variable
	 */
	TableColumnType type;

public:
	/*Constructor SymbolicVariable
	 * Attributes:
	 * 	tableName - The name of the SQL table where the symbolic variable is.
	 * 	columnName - The name of the Column of the SQL table where symbolic variable is.
	 * 	rowIndex - The index of the row where the symbolic variable is.
	 */
	 
	SymbolicVariable(std::string tableName, std::string columnName, int rowIndex, ColumnType type, int length);
	
	SymbolicVariable(std::string tableName, std::string columnName, int rowIndex, TableColumnType type);

	SymbolicVariable(const SymbolicVariable & other);
	

	virtual ~SymbolicVariable();

	virtual Expression * clone();

	/*Function: toString
	 * returns the string representation of Symbolic Variable
	 */
	std::string toString();
	/*Function toString
	 * Attributes:
	 * 	showType - if true it prints the type of the symbolic variable
	 * returns the string representation of the Symbolic Variable with or without the type representation depending on the showType variable
	 */
	std::string toString(bool showType);
	
	inline std::string getTableName(){return tableName;};
	inline std::string getColumnName(){return columnName;};
	inline TableColumnType getType(){return type;};
	inline int getRowIndex(){return rowIndex;};
	
};
#endif
